package zy.data.food.service;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import zy.data.food.domain.ProductInfo;
import zy.data.food.dto.CartDTO;

import java.util.List;


public interface ProductService {

    ProductInfo findone(String productId);

    List<ProductInfo> findAll();

    //分页参数Pageeble
    Page<ProductInfo> findallpage(Pageable pageable);

    ProductInfo save(ProductInfo productInfo);

    //增加库存
    void increaseStock(List<CartDTO> cartDTOList);

    //减少库存
    void decreaseStock(List<CartDTO> cartDTOList);

    //上架
    ProductInfo onSale(String productId);

    //下架
    ProductInfo offSale(String productId);

}


